<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
*/

$q= $_GET["q"];
include '../../../readcookie.php';
include '../../../db.php';
$sql="SELECT * FROM Event WHERE event_id ='$q'";

$result=mysql_query($sql);
$mode=1;

while (        $row=mysql_fetch_array($result)        ) {
    //echo $row["articleTITLE"];
    $id = $row["event_id"];
    $view = $row["event_view"];
    $publish = $row["event_publish"];
    $title = $row["event_title"];
    $start = $row["event_start"];
    $stop = $row["event_stop"];
    $price = $row["event_price"];
    $location = $row["event_location"];
    $type = $row["event_type"];
    $content = $row["event_description"];
    $morecontent =$row["event_more"];
    $img = $row["event_img"];
    $video = $row["event_video"];

    echo'
<form action="plugin/extravaganza/cms/updateevent.php"
  method="post" display:none>

<TABLE BORDER="0">
<TR style=\"visibility: hidden\">
    <TD>ID:</TD>
    <INPUT TYPE="TEXT" NAME="id" SIZE="70" VALUE = "',$id,'">
  </TR>
<TR>

    <TD>Type:</TD>';

    $tsql='SELECT type_id, type_tag FROM EventType';
    $types=mysql_query($tsql);

    while($row=mysql_fetch_array($types)) {
        $tid = $row['type_id'];
        $tthing = $row['type_tag'];
        if ($tid == $type) {
            $options.="<OPTION VALUE=\"$tid\" SELECTED>" . $tthing;
        }else {

            $options.="<OPTION VALUE=\"$tid\">" . $tthing;
        }

    }

    echo '<select name="typeID">
<OPTION VALUE=0>Select Type...',$options,'</select>
   ,</TR>
<TR>
    <TD>View:</TD>
    <select name="view">
    <OPTION VALUE = 0> Select View...
    <OPTION VALUE = 1';
    if ($view == 1) {
        echo ' SELECTED';
    } echo
    '> Single';
    echo '<OPTION VALUE = 2';
    if ($view == 2) {
        echo ' SELECTED';
    } echo
    '> Spread';
    echo '<OPTION VALUE = 3';
    if ($view == 3) {
        echo ' SELECTED';
    } echo
    '> Exhibit';
    echo '<OPTION VALUE = 4';
    if ($view == 4) {
        echo ' SELECTED';
    } echo
    '> Program';
    echo'
  </TR>
<TR>
  <TR>
    <TD>Title:</TD>
    <TD>
      <INPUT TYPE="TEXT" NAME="title" SIZE="70" VALUE = "',$title,'">
    </TD>
  </TR>
      <TR>
    <TD>Location:</TD>
    <TD>
      <INPUT TYPE="TEXT" NAME="location" SIZE="70" VALUE = "',$location,'">
    </TD>
  </TR>
      <TR>
    <TD>Start:</TD>
    <TD>
      <INPUT TYPE="TEXT" NAME="start" SIZE="70" VALUE = "',$start,'">
    </TD>
  </TR>
      <TR>
    <TD>Stop:</TD>
    <TD>
      <INPUT TYPE="TEXT" NAME="stop" SIZE="70" VALUE = "',$stop,'">
    </TD>
  </TR>
      <TD>Price:</TD>
    <TD>
      <INPUT TYPE="TEXT" NAME="price" SIZE="70" VALUE = "',$price,'">
    </TD>
  </TR>
    <TR>
    <TD>Content:</TD>
    <TD><textarea rows="5" cols="80" name="content" wrap="physical">',$content,'</textarea> </TD>
  </TR>
    <TR>
    <TD>More:</TD>
    <TD><textarea rows="5" cols="80" name="morecontent" wrap="physical">',$more,'</textarea> </TD>
    </TR>
        <TR>
    <TD>Image:</TD>
    <INPUT TYPE="TEXT" NAME="img" SIZE="70" VALUE = "',$img,'">
    </TR>
        <TR>
    <TD>Video:</TD>
    <INPUT TYPE="TEXT" NAME="vid" SIZE="70" VALUE = "',$video,'">
    </TR>


</TABLE>
<P><INPUT TYPE="SUBMIT" VALUE="Save" NAME="B1">
<INPUT TYPE="SUBMIT" VALUE="Delete" NAME="B2"></P>
</form>
';

}
?>
